package com.example.demo.service;
import com.example.demo.entity.Student;
import com.example.demo.mapper.StudentMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class StudentServiceImpl implements StudentService{
    @Autowired
    StudentMapper studentMapper;

    @Override
    public int addStudent(Student stu) {
        return studentMapper.addStudent(stu);
    }

    @Override
    public int deleteStudent(String s) {
        return studentMapper.deleteStudent(s);
    }

    @Override
    public int deleteBatchStudent(List<Student> list) {
        return studentMapper.deleteBatchStudent(list);
    }

    @Override
    public int updateStudent(Student stu) {
        return studentMapper.updateStudent(stu);
    }

    @Override
    public List<Student> getStudents() {
        return studentMapper.findStudent();
    }

    @Override
    public List<Student> findStudentByCondition(Student stu) {
        return studentMapper.findStudentByCondition(stu);
    }
}
